var fs=require("fs");
var path=require("path");

var readPath=path.join(__dirname,"/from.txt");
var writPath=path.join(__dirname,'/to.txt');
var readable=fs.createReadStream(readPath);
var writable=fs.createWriteStream(writPath);

readable.on("data",function(chunk){
    var chunk=chunk.toString('utf-8');
    var str=chunk.toUpperCase();
    console.log(str)
    writable.write(str);
})


